Version
1.0 Alpha April
28, 2001 Copyright
2001 Written Peter Watje watjep@mindspring.com V6 Source Code |
|
This plugin is what I define as charityware
and can be freely distributed. If you
find it useful make what you feel as an appropriate donation to your favorite
charity. You cannot charge or make any
money from this routine by reselling or bundling them with another package/cd/web page without my permission.
To
install this routine just copy the ObjectDeform.dlm
file into your 3ds Max plugin directory.
This
modifier lets you deform one object with another. Apply the Object Deform modifier to the
object that you want to be deformed.
Create another object and animate it cross the surface the
object. The pick that object as your
deform object. This will allow you to
do effects like foot prints in the snow, or dragging your finger in the sand. Deformer
Object – this is
the object that will be doing the deforming/ Standoff
Dist – this is
how far the surface will stay from the deforming object. Quad
Dept – This
texture uses a lot of intersection with the mesh and uses a quad tree to make
this fast. Setting this value lower
causes it to be slower, but use less memory.
Increases this value will make it faster but cause it to use more
memory exponentially. Ideally the more
polygons in your object the higher you should turn this up to prevent slow
downs. At 10
it will consume roughly 50+ megs of memory.
Use this size only when you have gobs and gobs of memory and using
mesh with lots and lots vertices. At 9
it will use roughly 10+ megs. <9
it will use around 3 megs or less. The
memory consumption is based on 1000 vertex sphere, so sizes will vary also
based on the number of vertices and faces in the mesh. ZDepth Collision
– This is the first method of deforming the mesh. This is a relatively fast method, but
requires that the collision object’s Z Axis be somewhat perpendicular to the
surface for it to work well. Basically
it transforms the surface into the space of the collision object. Then any point that is below a face in the
Z Axis is moved above that face. Inside/Outside
Collision – This
method uses an inside/out algorithm to deform the mesh. It is a quite a bit slower than the ZDepth method but allows you to not have to align the
collision object to the surface. It
also requires that the object be a closed object and works best with non
concave surfaces. Basically if a point
is inside the collision object, it is moved along its normal until it is
outside the object. The Dents and
Quality only affect this collision type. Dent – If this is checked the points
are moved along their negative normal. Quality – This determines how
accurate the collision is. The higher
this number the more accurate collision will be but slower. Falloff
Effect – This
will try to smooth the vertices surrounding the effect. This code is still pretty rough and not
working that well. The value is how
far out to smooth. Remember
Effect section
is used when you want the effect to accumulate over time. Dragging you finger around is sand is an
effect that you can get with this.
Normally the effect is only present at one frame with this you can
have the effect present across multiple frames. The only problem is that this is not an
interactive effect, you have to re solve every time you want the effect to
update. Affect
Multiple Frames
– This turns this effect on and off basically turning on/off the cache. Start
Frame – This is
the start frame End
Frame – This is
the end frame Solve – This will solve the effect and
cache it to memory. You need to solve
every time you want to change some aspect of the effect. Clear
Memory – This
will clear the cache freeing memory but losing the effect. This effect can eat up a considerable
amount on memory on larger meshes. If
this is the case you can use the Point Cache modifier to cache the effect to
disk and then clear the cache and turn the modifier off. |
|
Quick Use Tutorial
1.
In
the top view create a plane 200x200 with 100 segments in both directions. 2.
Create
a 20x20x20 box centered on the plane. 3.
Assign
the Object Deform modifier to the plane. 4.
Set
the box as your deformer object. The
vertices bounded by the box on the plane should jump so that they above the
box. 5.
Set
the Standoff Dist to 4, and notice now that the vertices will displace 4
units above the box. 6.
Now
rotate the box 45 degrees along the local Y Axis. Notice that the vertices are transformed
along the local Z Axis of the boxes.
This is because the default method is ZDepth
which moves the points along the local Z. 7.
Now
rotate the box another 90 degrees.
Notice it now deforms the point into the plane since that is now the
direction of the box’s local X Axis. 8.
Now
set the Collision Type to Inside/Outside. You will get a different looking
deformation. The reason is that first
it only affects points inside the box.
Next it moves the points based their normals
instead an axis. Turn on the Dents
check box and now the deformation will go along the negative normals. 9.
Adjust
the Quality spinner down and notice as the quality goes down, the farther
away from the mesh the points become.
This spinner controls how many iterations the algorithm will use. The more iterations
the closer the points will be to the surface. 10. Now animate the box around the
surface of the plane. Notice the
effect is not accumulative. 11. Now go to the Remember Effect
section and turn on Affect multiple frames, scrub the timer and notice that
nothing has changed. This is because
this mode is not interactive. Leave
the start and end frames at 0 and 100 and press the Solve button. 12. Now the effect will
accumulate. Just below the Solve
button it tells you that the cache has consumed 1.42 megs
of memory. The more frames you solve
or the larger the mesh the more memory you will consume. You can use the Point Cache modifier to
diminish the amount of memory used. 13. Note now the effect is not
interactive, if you move the box and want the effect to update you must hit
the solve button. |
|
|
|
|
|
Known Bugs
The
Falloff is still a pretty crude algorithm
It only
works with tri mesh objects
Since
it samples only on frames fast moving objects will create a noncontinuous
effect.
If you have
any question you contact me at: